<%@ page contentType="text/html; charset=GBK" %>
<%@ page import="com.wonders.ips.sysadmin.AdminMenu"%>

<%
int id = Integer.parseInt(request.getParameter("id"));
int parent_id = Integer.parseInt(request.getParameter("parent_id"));
String name = request.getParameter("name").trim();
String href = request.getParameter("href");

String root_id = request.getParameter("root_id");

String actionType = request.getParameter("actionType");

AdminMenu m = new AdminMenu();

if (actionType.equals("0"))
  m.add(parent_id,name,href);
if (actionType.equals("1"))
  m.update(id,parent_id,name,href);
if (actionType.equals("2"))
  m.deleteAll(id);

response.sendRedirect("list_menu.jsp?parent_id="+parent_id+"&root_id="+root_id);
%> 
